package cn.keniykey.mc.landterritory.landview;

import org.bukkit.entity.Player;

import cn.keniykey.mc.landterritory.LandTerritoryMain;
import cn.keniykey.mc.landterritory.config.ConfigurationManager;
import cn.keniykey.mc.viewlibrary.view.api.AbFrameViewContentShare;

public final class LandViewContentShare extends AbFrameViewContentShare{
	private long time_last_click;
	
	protected LandViewContentShare(Player player1) {
		super(LandTerritoryMain.getPlugin(), player1);
	}
	
	boolean isMatchClickSpeed() {
		final long time_current = System.currentTimeMillis();
		if(0l == this.time_last_click) {
			this.time_last_click = time_current;
			return true;
		}
		final long time_difference = (time_current - this.time_last_click);
		if(time_difference > ConfigurationManager.View_ClickSpeed) {
			this.time_last_click = time_current;
			return true;
		}
		return false;
	}
}